home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 5 / Skunkware 5.iso / src / X11 / wais / waisgate / list.h < prev    next >
C/C++ Source or Header  |  1995-05-09  |  1KB  |  63 lines

  1. /* WIDE AREA INFORMATION SERVER SOFTWARE
  2.    No guarantees or restrictions.  See the readme file for the full standard
  3.    disclaimer.    
  4.    Brewster@think.com
  5. */
  6.  
  7. /* list utilities */
  8. #ifndef LIST_H
  9. #define LIST_H
  10.  
  11. #include "cutil.h" /* for boolean */
  12.  
  13. #ifdef __cplusplus
  14. /* declare these as C style functions */
  15. extern "C"
  16.     {
  17. #endif /* def __cplusplus */
  18.  
  19. void* car _AP((void **list));
  20.  
  21. void* first _AP((void **list));
  22.  
  23. void* second _AP((void **list));
  24.  
  25. void* last _AP((void **list));
  26.  
  27. void** cdr _AP((void **list));
  28.  
  29. void** nth_cdr _AP((void **list,long n));
  30.  
  31. void** rest _AP((void **list));
  32.  
  33. void* cadr _AP((void **list));
  34.  
  35. void* nth _AP((long number, void **list));
  36.  
  37. void setf_nth _AP((long number,void* elem,void**list));
  38.  
  39. /* length of a list.  returns -1 if error.*/
  40. long length _AP((void **list));
  41.  
  42. void mapcar _AP((void **list, void function (void* argument)));
  43.  
  44. /* pushes the item on the end of the list. returns the list. */
  45. void **collecting _AP((void **list, void *item));
  46.  
  47. void setf_car _AP((void** list, void* item));
  48.  
  49. boolean null _AP((void **list));
  50.  
  51. boolean free_list _AP((void **list));
  52.  
  53. void sort_list _AP((void** list,int (*cmp)(void* arg1,void* arg2)));
  54.  
  55. void** remove_item_from_list _AP((void** list,long pos));
  56.  
  57. #ifdef __cplusplus
  58.     }
  59. #endif /* def __cplusplus */
  60.  
  61.  
  62. #endif /* ndef LIST_H */
  63.